<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .bixone{
        width: 300px;
        height: 300px;
        background-color: red;
        position: absolute;
        top: 40px;
        left: 0;
    }
    .btnone{
        width: 60px;
        height: 30px;
    }
</style>

<body>
    <div id="box">
        <div>
            <button class="btnone">1</button>
            <button class="btnone">2</button>
        </div>
        <div class="bixone">A</div>
        <div class="bixone">B</div>
    </div>
</body>

</html>
<script>
    let btns = document.getElementsByClassName('btnone')

    for(let i=0;i<btns.length;i++){
        btns[i].onclick = function(){
            
        }
    }

    }
</script>